<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
    <title>ICP query</title>
    <meta property="og:url" content="https://api.vvhan.com/"/>
    <meta itemprop="image" content="/images/logo.webp"/>
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="../css/main.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/ashes.min.css"/>
</head>
<style>
    body {
        margin-right: 10px;
        border: 1px solid #ced4da;
        border-radius: 4px;
    }

    button {
        padding: 10px 20px;
        background-color: #007BFF;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

    button:hover {
        background-color: #0056b3;
    }

    .result {
        margin-top: 20px;
        padding: 20px;
        background-color: white;
        border: 1px solid #ced4da;
        border-radius: 4px;
        display: inline-block;
        text-align: left;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
</style>
<body>
<img src="/images/logo.webp" alt="logo" style="display: none"/>
<section class="fixed-section">
    <canvas class="vh-bg"></canvas>
    <div class="vh_boy"></div>
</section>
<header>
    <h1>ICP备案查询</h1>
</header>
<style>
    .el-row , .el-button , .text-btn {
        color-scheme: dark !important;
        --darkreader-neutral-background: #181a1b;
        --darkreader-neutral-text: #d4d0cb;
        --darkreader-selection-background: #0650a8;
        --darkreader-selection-text: #e3e1de;
        color: #e3e1de;
        -webkit-text-size-adjust: 100% !important;
        font-size: 14px;
        -webkit-tap-highlight-color: rgba(227, 225, 222, 0);
        -webkit-box-direction: normal;
        font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif;
        outline: none;
        outline-color: initial;
        padding: 0;
        margin: 0;
        position: relative;
        box-sizing: border-box;
    }

    .el-textarea, textarea {
        color-scheme: dark !important;
        --darkreader-neutral-background: #181a1b;
        --darkreader-neutral-text: #d4d0cb;
        --darkreader-selection-background: #0650a8;
        --darkreader-selection-text: #e3e1de;
        color: #e3e1de;
        -webkit-text-size-adjust: 100% !important;
        -webkit-tap-highlight-color: rgba(227, 225, 222, 0);
        -webkit-box-direction: normal;
        font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif;
        outline: none;
        outline-color: initial;
        padding: 0;
        margin: 0;
        position: relative;
        display: inline-block;
        width: 100%;
        vertical-align: bottom;
        font-size: 14px;
    }

    .el-divider {
        color-scheme: dark !important;
        --darkreader-neutral-background: #181a1b;
        --darkreader-neutral-text: #d4d0cb;
        --darkreader-selection-background: #0650a8;
        --darkreader-selection-text: #e3e1de;
        color: #e3e1de;
        -webkit-text-size-adjust: 100% !important;
        font-size: 14px;
        -webkit-tap-highlight-color: rgba(227, 225, 222, 0);
        -webkit-box-direction: normal;
        font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif;
        outline: none;
        outline-color: initial;
        padding: 0;
        position: relative;
        display: block;
        height: 1px;
        width: 100%;
        margin: 24px 0;
        background-color: rgb(45, 48, 50);
    }

    .el-button  ,.text-btn  { color: #6eeff3 ;
        background-color: #007BFF;
        border-color: #007BFF;
        border-radius: 4px;
        padding: 10px 20px;
        font-size: 14px;
        cursor: pointer;
        display: inline-block;
        text-align: center;
        white-space: nowrap;
        vertical-align: middle;
        -webkit-user-select: none;
        -moz-user-select: none;

    }



</style>
<main>

    <div class="top">
        <div class="el-row">
            <div class="el-col el-col-24 el-col-xs-24 el-col-sm-20 el-col-md-20 el-col-lg-20 el-col-xl-20"><h1>
                输入域名或网址</h1></div>
            <div class="like-btn el-col el-col-24 el-col-xs-24 el-col-sm-4 el-col-md-4 el-col-lg-4 el-col-xl-4">
                <button type="button" class="el-button el-button--primary el-button--small is-plain"
                        style="margin-right:10px;"><!----><!----><span>
          收藏
        </span></button>
            </div>
        </div>
    </div>
    <div class="el-textarea"><textarea  id="domain" autocomplete="off" rows="6" placeholder="请输入或者粘贴需要处理的文本"
                                       class="el-textarea__inner" style="min-height: 100.6667px;"></textarea><!---->
    </div>
    <div class="el-divider el-divider--horizontal">
        <div class="el-divider__text is-center">to</div>
    </div>
    <div class="el-textarea is-disabled"><textarea disabled="disabled" autocomplete="off" rows="6" id="result"
                                                   placeholder="处理结果" class="el-textarea__inner"
                                                   style="min-height: 100.6667px;"></textarea><!----></div>
    <div class="text-btn"><!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!---->
        <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!----> <!---->
        <button  onclick="checkICP()"  type="button" class="el-button el-button--primary is-round"><!----><!----><span>查询</span></button>
    </div>

</main>
<script>
    function checkICP() {
        const domain = document.getElementById('domain').trim();
        if (!domain) {
            alert('请输入域名地址');
            return;
        }
        var myHeaders = new Headers();
        myHeaders.append("User-Agent", "Apifox/1.0.0 (https://apifox.com)");

        var requestOptions = {
            method: 'GET',
            headers: myHeaders,
            redirect: 'follow'
        };

        const url = `https://papi.v-box.cn/api/app/open-api/icp?url=${domain}`;
        console.log(url);
        fetch(url ,requestOptions)
            .then(response => response.text())
            .then(data => {
                const resultDiv = document.getElementById('result');
                if (data.code === 200) {
                    resultDiv.innerHTML = `
                            <p><strong>域名：</strong> ${data.data.domain}</p>
                            <p><strong>ICP备案号：</strong> ${data.data.icp}</p>
                            <p><strong>公司名称：</strong> ${data.data.company}</p>
                            <p><strong>网站名称：</strong> ${data.data.websiteName}</p>
                        `;
                } else {
                    resultDiv.innerHTML = `<p>查询失败: ${data.message}</p>`;
                }
            })
            .catch(error => {
                const resultDiv = document.getElementById('result');
                resultDiv.innerHTML = `<p>查询出错: ${error}</p>`;
            });
    }
</script>
<svg class="vh-bolang" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
     viewBox="0 24 150 28" preserveAspectRatio="none">
    <defs>
        <path id="vh-bolang-item" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"></path>
    </defs>
    <g class="vh-bolang-main">
        <use xlink:href="#vh-bolang-item" x="50" y="0" fill="rgba(224,233,239,.5)"></use>
        <use xlink:href="#vh-bolang-item" x="50" y="3" fill="rgba(224,233,239,.5)"></use>
        <use xlink:href="#vh-bolang-item" x="50" y="6" fill="rgba(224,233,239,.5)"></use>
    </g>
</svg>
<section class="ξvh-toast"></section>
<script src="../js/main.min.js"></script>
<script src="../js/jquery.min.js"></script>

<!-- 子页面展示 -->
<script src="../js/page.js"></script>
<script src="../js/highlight.min.js"></script>
<script>
    $(() => hljs.highlightAll());
</script>

<!-- 统计代码 -->
<script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script>
<script>
    LA.init({id: "JLvourAu9qIUtWYT", ck: "JLvourAu9qIUtWYT"});
</script>
</body>
</html>
